package com.service;

import com.core.dto.FileUploadDTO;
import com.core.dto.GoodDTO;
import com.core.model.lxf.GoodType;
import com.core.model.lxf.SecKillGoods;
import com.core.model.user.UserInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-7-22
 * Time: 下午11:20
 * To change this template use File | Settings | File Templates.
 */
public interface LxfService {

    void add(GoodDTO goodDTO);

    void saveOrUpdateFile(FileUploadDTO fileUploadDTO);

    void upload(MultipartFile file);

    void download(HttpServletResponse response);

    byte[] showImageByGuid(String guid);

    void autoSchedule();

    List<GoodDTO> allStudent();

    Map<String, Object> saveGood(GoodDTO goodDTO);

    Map<String, Object> delGood(String goodGuid);

    Map<String, Object> updateGood(GoodDTO goodDTO);

    UserInfo findUserInfoByUserGuid(String userInfoGuid);

    void addGood();

    GoodType findGoodType();

    void aopLearn(HttpServletResponse response, HttpServletRequest request);

    SecKillGoods findById(String id);

    int reduceStock(String id, Integer remainNum);

    void generateOrder(String consumer, String goodsId, Integer num);

    void saveSecKillGoods(SecKillGoods secKillGoods);
}
